// 获取课程列表
export const getCourseList = (params = {}, config = { 
    custom: { 
        auth: false 
    } 
}) => uni.$u.http.get('/course/list');


// 获取热门推荐列表(分页)
export const pageTeacher = (params = {}, config = { 
    custom: { 
        auth: false 
    } 
}) => uni.$u.http.post('/teacher/page',params,config);

// 获取最新通知列表
export const getNoticeList = (params = {}, config = { 
    custom: { 
        auth: false 
    } 
}) => uni.$u.http.post('/notice/list');


// 获取通知详情
export const getNoticeDetail = (id, config = { 
    custom: { 
        auth: false 
    } 
}) => uni.$u.http.get(`/notice/${id}`, { 
    ...config 
});



export const teacherInfo = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/teacher/getTeacherInfoDetail', data, config);

export const before_join = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/meet/before_join', data, config);	

export const joinMeet = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/meet/join', data, config);

export const getTeacherDays = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/teacher/getTeacherDays', data, config);

export const adminLogin = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/auth/admin/login', data, config);

// 用户登录
export const userLogin = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/auth/user/login', data, config);

export const addTeacher = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/teacher/add', data, config);

export const addNotice = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/notice/add', data, config);

export const updateNewsStatus = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/admin/updateNewStatus', data, config);

export const deleteNews = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/admin/deleteNews', data, config);

export const updateNotice = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/notice/update', data, config);

export const updateTeacherStatus = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/admin/updateTeacherStatus', data, config);

export const getAminTeacherInfo = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/admin/getTeacherInfo', data, config);

export const updateTeacherInfo = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/teacher/update', data, config);


export const getHomeInfo = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/home/getHomeInfo', data, config);

export const getTimeDetail = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/teacher/timeDetail', data, config);

export const getJoinDetail = (data, config = {

	custom: {
		auth: false
	}
}) => uni.$u.http.post('/meet/joinDetail', data, config);

export const getCalendarHasDay = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/meet/hasDay', data, config);

export const getCalendarList = (data, config = {

	custom: {
		auth: false
	}
}) => uni.$u.http.post('/meet/list', data, config);

export const addFav = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/favorite/add', data, config);

export const removeFav = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/favorite/cancel', data, config);

export const checkFav = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/favorite/check', data, config);

export const getSetupContent = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/appConfig/getByKey', data, config);

export const updateSetupContent = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/appConfig/update', data, config);

export const addSetupContent = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/appConfig/create', data, config);

export const userDetail = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/auth/userDetail', data, config);

export const updateUserInfo = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/auth/user/update', data, config);

export const cleanUpUserLog = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/userLog/cleanup', data, config);

export const deleteUser = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/user/delete', data, config);

export const getUserDetail = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/user/detail', data, config);

export const updateUserStatus = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/user/updateStatus', data, config);

export const vTouchItem = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/admin/vTouch', data, config);

export const setTopItem = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/admin/top', data, config);

export const teacherDetail = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/teacher/detail', data, config);

export const getMeetDayList = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/meet/dayList', data, config);
	
export const getWorkHome = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/teacher/home', data, config);

export const getTeacherDetail = (id, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.get(`/teacher/${id}`, config);

export const writeOff = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/writeOffRecord/writeOff', data, config);

export const cancelWriteOff = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/writeOffRecord/cancelWriteOff', data, config);

export const updateReservationStatus = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/reservation/updateStatus', data, config);

export const cancelReservationBySlot = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/reservation/cancelBySlot', data, config);

export const deleteReservation = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/reservation/delete', data, config);

export const addFoot = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/history/add', data, config);

export const register = (data, config = {
	custom: {
		auth: false
	}
}) => uni.$u.http.post('/auth/register', data, config);

// export const uploadFile = (file, config = {
// 	custom: {
// 		auth: false
// 	}
// }) => uni.$u.http.post('/file/upload', file, config);